package com.example.telesys.service.impl;

import com.example.telesys.mapper.BroadbandMapper;
import com.example.telesys.pojo.Broadband;
import com.example.telesys.pojo.BroadbandExample;
import com.example.telesys.service.BroadbandService;
import com.example.telesys.utils.UuidUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BroadbandServiceImpl implements BroadbandService {

    @Autowired
    private BroadbandMapper broadbandMapper;

    @Override
    public List<Broadband> selectAllBroadband() {
        return broadbandMapper.selectByExample(null);
    }

    @Override
    public Broadband selectBroadbandById(String broadbandid) {
        BroadbandExample broadbandExample = new BroadbandExample();
        BroadbandExample.Criteria criteria = broadbandExample.createCriteria();
        criteria.andBroadbandidEqualTo(broadbandid);
        return broadbandMapper.selectByExample(broadbandExample).get(0);
    }
}
